//Cyclone-Portal
//GAM 450 Final Project
//Gregory Dillon, Brian Gates, Kyle Chmielewski
//Portal.h
//Class .h file for the Portal class that holds all
//portal information/variables

#pragma once

#include "qec.h" // engine interface
#include "demoncore.h" // DePaul's core library
#include "ParticleSystem.h"
#include <cyclone\collide_fine.h>

using namespace cyclone;


////////////////////////////////////////////////////////////////////////////////
// Portal Class
class Portal : public qe 
{
   public:
      chr namePortal[16];  // name of object
      float tLast;         // last update time in seconds
      Vec3 xyzPortal;      // position
      Vec3 velPortal;      // velocity
      Vec3 upVector;       // upvector of portal
      Vec3 rightVector;    // right vector
      Vec3 normal;         // normal; from up and right vector
      float yaBaseRad;     // Y angle of base in radians
      float yaTurretRad;   // Y angle of turret in radians
      float colorPortal[3]; // Portal color

      // functions
      Portal(); // constructor
      Portal(int i);    // constructor
      int update();     // update
      int draw();       // draw
      void zap();       // controlled delete
      int spherePlaneCollision(ParticleSystem *object);  //sphere plane collision
      int drawNormal(); // draw normal vector of portal
}; // Portal


//Function Prototypes
Vector3 vecToVector(Vec3 v);
